<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META content=IE=EmulateIE7 http-equiv=X-UA-Compatible>
<TITLE>博士生选房系统</TITLE>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<META name=GENERATOR content="MSHTML 8.00.6001.18999">
<script type="text/javascript" src="js/min_contentslider.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.query.js"></script>
<script type="text/javascript" src="js/jquery.scrollFollow.js"></script>
<script type="text/javascript">

function changeCurrent(id)
{
	var a_var=document.getElementById(id);
	var y=getElementTop(a_var);
	var x=getElementLeft(a_var);
	var ptr=document.getElementById("ptr");
	ptr.offsetHeight=y;
	ptr.offsetLeft=x+a_var.offsetWidth+8;
	ptr.style.visibility="visible";
}
function cancelChoose(){
	if(confirm("确认取消该床位吗？")){
		$.post("AjaxAction!cancelChoose.action",null,function(data){
			if(data[0].result=="success"){
				alert('退房成功！');
				$(window.frames["rooms"].document).find("#chooseState").html('未选房！');
				$(window.frames["rooms"].document).find('#chooseRoom').html('无');
				$(window.frames["rooms"].document).find('#chooseBed').html('无');
			}else if(data[0].result=="logout"){
				alert('登陆超时！');
				parent.location.href="login.html";
			}else{
				alert('抱歉，退房失败，请稍后重试，如果问题依然存在，请与管理员联系！');
			}
		},"json");
	}
}

$(document).ready(function(){
	var f = $.query.get("f");
	if(f==null||f==""){
		location.href="A17_select.html?f=1";
		return;
	}
	if(f<=2)
		$('#rooms').attr('src', 'A17_CUT_0'+f+'.html');
	else if(f<=11)
		$('#rooms').attr('src', 'A17_CUT_03.html');
	else if(f<=15)
		$('#rooms').attr('src', 'A17_CUT_13.html');
	else 
		location.href="A17_select.html?f=1";
	$("#navigate_bar a:eq("+(f-1)+")").css({
		"background-color":"green",
		"color":"cyan"
	});
	$( '#flowDiv' ).scrollFollow(); 
	$.post("AjaxAction!getTimeRange.action",{
		department:"A17"
	},function(data){
		if(data[0].result=="success"){
			$('#start_time').html(data[1].opentime+" 00:00:00");
			$('#end_time').html(data[1].closetime+" 00:00:00");
		}
	},"json");
});

</script>
</HEAD>
<BODY>
<div style="postition: relative; float: right">
		<div>
		<a href="main.html">首页</a> <a href="studentInfo.jsp">个人信息管理</a> <a
			href="javascript:void(0)" onclick="cancelChoose();">取消选房</a> <a
			href="logout.jsp">退出</a>
		</div>
		<div id="flowDiv">
			<div>
				<label>开始时间：</label><label id="start_time">--</label> <br /> <label>结束时间：</label><label
					id="end_time">--</label> <br />
			</div>
			<div id="colorInfo" style="margin-top: 10px;">
				<div>
					<span style="color: red">房间颜色提示：</span>
				</div>
				<div id="boyRoomInfo" style="position:relative">
					<div
						style="width: 40px; height: 20px; background-color: blue; opacity: 0.6">
					</div>
					<div style="position:absolute; top:0px; left:60px">
						<span style="color: blue;">男生房间</span>
					</div>
				</div>
				<div id="girlRoomInfo" style="position:relative">
					<div
						style="width: 40px; height: 20px; background-color: red; opacity: 0.6">
					</div>
					<div style="position:absolute; top:0px; left:60px">
						<span style="color: red;">女生房间</span>
					</div>
				</div>
				<div id="closedRoomInfo" style="position:relative">
					<div
						style="width: 40px; height: 20px; background-color: black; opacity: 0.6">
					</div>
					<div style="position:absolute; top:0px; left:60px">
						<span style="color: black;">未开放房间</span>
					</div>
				</div>
			</div>
		</div>
	</div>

<div id="navigate_bar">
	<a href="A17_select.html?f=1">第 1   层</a><br/><br/>
    <a href="A17_select.html?f=2">第 2 层</a><br/><br/>
    <a href="A17_select.html?f=3">第 3 层</a><br/><br/>
    <a href="A17_select.html?f=4">第 4 层</a><br/><br/>
    <a href="A17_select.html?f=5">第 5 层</a><br/><br/>
    <a href="A17_select.html?f=6">第 6 层</a><br/><br/>
    <a href="A17_select.html?f=7">第 7 层</a><br/><br/>
    <a href="A17_select.html?f=8">第 8 层</a><br/><br/>
    <a href="A17_select.html?f=9">第 9 层</a><br/><br/>
  	<a href="A17_select.html?f=10">第 10 层</a><br/><br/>
   <a href="A17_select.html?f=11">第 11 层</a><br/><br/>
   <a href="A17_select.html?f=12">第 12 层</a><br/><br/>
   <a href="A17_select.html?f=13">第 13 层</a><br/><br/>
   <a href="A17_select.html?f=14">第 14 层</a><br/><br/>
   <a href="A17_select.html?f=15">第 15 层</a><br/><br/>
</div>
<div id="room">
<!--left:355px total1205 -->
<iframe src="A17_CUT_13.html" id="rooms" name="rooms" width="850px" height="545px" scrolling="no" frameBorder="0"></iframe>
</div>
<div id="bed" style="visibility:hidden"></div>
<div id="char"></div>
<div id="title">A17公寓选房</div>

</BODY>
</HTML>
